package net.dopan.pigframe.demo.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.*;

import java.beans.Transient;
import java.io.Serializable;

/**
 * @author wufeihong
 * 用户笔记表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("user_note" )
public class UserNote extends Model<UserNote> {

    private static final long serialVersionUID = 1L;

    /**
     * 笔记Id
     */
    @TableId(value = "note_id", type = IdType.AUTO)
    private long noteId;
    @TableField("user_id" )
    private long userId;
    @TableField("note_url" )
    private String noteUrl;
    @TableField("type_flag" )
    private String typeFlag;

    @Transient
    @Override
    protected Serializable pkVal() {
        return this.noteId;
    }
}
